#include <iostream>
#include <vector>

using namespace std;

int main() {
	vector<int> g1;
	for(int i = 0; i <= 5; i++) {
		g1.push_back(i);
	}

	cout << "Output of begin and end: ";
	for (auto i = g1.begin(); i != g1.end(); ++i) {
		cout << *i << " ";
	}
	cout << "\nOutput of rbegin and rend: ";
	for (auto ir = g1.rbegin(); ir != g1.rend(); ++ir)
		cout << *ir << " ";
	cout << "\nOutput of crbegin and crend: ";
	for (auto ir=g1.crbegin(); ir != g1.crend(); ++ir)
		cout << *ir << " ";
	cout << endl;
	return 0;
}
